from distutils.core import setup
from distutils.extension import Extension
from Cython.Build import cythonize
import numpy

extensions = [
    Extension(
        "operator_cython",
        ["operator_cython.pyx"],
        include_dirs=[numpy.get_include()],
    )
]

setup(
    ext_modules=cythonize(
        extensions,
        compiler_directives={
            'language_level': '3',  # 设置语言级别为 Python 3
            'boundscheck': False,
            'wraparound': False,
            'cdivision': True,      # 启用 C 级别的整数除法
        }
    ),
)
